﻿namespace ImapComponent.Net.Mail.Mime
{
    using System.Collections;

    /// <summary>
    /// Represents the collection of the mime attachment.
    /// </summary>
    public class MimeAttachmentCollection : CollectionBase
    {
        #region Methods

        /// <summary>
        /// Adds the provided mime attachment to the collection.
        /// </summary>
        /// <param name="mimeAttachment">The mime attachment to be added.</param>
        public void Add(MimeAttachment mimeAttachment)
        {
            this.List.Add(mimeAttachment);
        }

        #endregion // Methods

        #region Indexers

        /// <summary>
        /// Returns the mime attachment at the specified index in the collection.
        /// </summary>
        public MimeAttachment this[int index]
        {
            get
            {
                return (MimeAttachment)this.List[index];
            }
        }

        #endregion // Indexers
    }
}
